<?php


namespace app\model\pc;


use app\model\BaseModel;
use think\model\concern\SoftDelete;

class FacadeNotice extends BaseModel
{
    use SoftDelete;

    /**
     * 模型名称
     * @var string
     */
    protected $table = 'free_facade_notice';
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = '0000-00-00 00:00:00';


    // 设置字段信息
    protected $type = [
        'isSlideshow' => 'boolean',
    ];

    public function searchTitleAttr($query, $value, $data)
    {
        $query->where('title', 'like', '%' . $value . '%');
    }

    public function searchTypeAttr($query,$value){
        $query -> where('type','like', '%' . $value . '%');
    }

    public function searchIsSlideshowAttr($query,$value){
        $query -> where('isSlideshow','like', '%' . $value . '%');
    }
}